package com.zbest.common.lang.base;

import java.io.Serializable;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.zbest.common.lang.enums.SystemCode;
import com.zbest.common.lang.util.CoreSystemUtils;

/**
 * 服务调用请求参数基类<br/>
 *
 * Created by wu.charles on 2014/12/10.
 */
public abstract class AbstractRequest extends AbstractModel implements Serializable {
    private static final long serialVersionUID = -1605344118671426044L;

    /**
     * 调用方服务编码<br/>
     *
     */
    private SystemCode       service          = null;

    public AbstractRequest() {
        setClientIp(CoreSystemUtils.localIp());
        setClientHostName(CoreSystemUtils.localHostName());
    }

    public SystemCode getService() {
        return service;
    }

    public void setService(SystemCode service) {
        this.service = service;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
